﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CarsWebApplication.businesslogic.constants;

namespace CarsWebApplication.businesslogic.entities
{
    public class Brand
    {
        private int id;
        private string name;

        public Brand(string commaSeperatedValue)
        {
            string[] brandInfo = commaSeperatedValue.Split(CarWebAppConstants.COMMA);
            Int32.TryParse(brandInfo[0], out id);
            this.name = brandInfo[1];
        }

        public Brand(int id, string name)
        {
            this.id = id;
            this.name = name;
        }

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

    }
}